/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.gu.derp.model;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Represents an item in a feed. Is *not* stored to the database, only loaded 
 * at runtime when a user reads a feed.
 * 
 * @author jakob
 */
public class Item {
    private String title;
    private String link;
    private String description;
    private Date pubDate;

    public Item(String title, Date pubDate, String description, String link) {
        this.title = title;
        this.link = link;
        this.description = description;
        this.pubDate = pubDate;
    }

    public String getDescription() {
        return description;
    }

    public String getLink() {
        return link;
    }

    public Date getPubDate() {
        return pubDate;
    }

    public String getTitle() {
        return title;
    }
    
    public String getPubDateString() {
        return new SimpleDateFormat("dd MMMM, HH:mm:ss").format(pubDate);
    }
}
